#include<iostream>
using namespace std;
int high,a[10];

int main(){
	for(int i=0;i<10;i++)cin>>a[i];
	cin>>high;
	high+=30;
	int ans=0;
	for(int i=0;i<10;i++){
		if(high>=a[i])ans++;
	}
	cout<<ans<<endl;
	return 0;
}
